﻿using System;
using System.Collections.Generic;
using Tao.OpenGl;

namespace AvantGameMachine.Graphics
{
    public class Line : IRenderizableObject
    {
        protected PosVector startPoint = new PosVector();
        protected PosVector endPoint = new PosVector();

        public PosVector StartPoint
        {
            get { return startPoint;  }
            set { startPoint = value; }
        }

        public PosVector EndPoint
        {
            get { return endPoint;  }
            set { endPoint = value; }
        }

        public override void Render()
        {
            Gl.glBegin(Gl.GL_LINES);
            Gl.glColor3f(0.0f, 1.0f, 0.0f);
            Gl.glVertex3f(startPoint.X, startPoint.Y, startPoint.Z);
            Gl.glVertex3f(endPoint.X, endPoint.Y, endPoint.Z);
            Gl.glEnd();
        }
    }
}
